<script setup lang="ts">
function hello1(){
console.log("点击了按扭 1");
}
function hello2(){
console.log("点击了按扭 2");
}
function hello3(userName,age){
console.log(userName+"的年龄为："+age);
} </script>
<template>
<input type="button" value="按扭 1" v-on:click="hello1">
<input type="button" value="按扭 2" @click="hello2">
<input type="button" value="按扭 3" @click="hello3('张三',30)">
</template>
<style scoped>
input{
margin:5px;
} </style>